package com.weike.yuanding.strategy;

import lombok.Data;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;
import org.springframework.stereotype.Component;

import java.util.Map;

/**
 * @ClassName: ChatStrategyFactory
 * @Author: YuanDing
 * @Date: 2025/4/23 21:28
 * @Description:
 * 大模型对话策略工厂类
 */

@Data
@Component
@ConfigurationProperties(prefix = "ai")
public class ChatStrategyFactory {

    @Autowired
    private Map<String , ChatStrategy> chatStrategyMap;

    private String platform;

    public ChatStrategy  getAiStrategyImpl() {
        return chatStrategyMap.get(platform);
    }

}
